#include <list>
#include <map>
#include <set>
#include <iostream>
#include <algorithm>
#include <iterator>

class test
{
public:
    test (int n, int i):n_(n), i_(i){}
#if 0
    bool operator < (const test &t2)
    {
	return this->n_ < t2.n_;
    }
#endif
    int n_;
    int i_;
};
class compare
{
public:
    bool operator () (const test* t1, const test* t2)
    {
	return t1->n_ < t2->n_;
    }
};
std::ostream & operator << (std::ostream &os, const test *t)
{
    os << t->n_ << ":" << "\n";
    return os;
}
int main ()
{
    std::map<int, test*, compare> set_test;
    set_test.insert (std::make_pair(4, NULL));
    set_test.insert (std::make_pair(7, NULL));
    set_test.insert (std::make_pair(2, NULL));
    set_test.insert (std::make_pair(3, NULL));
    set_test.insert (std::make_pair(1, NULL));
    std::map<int, test*, compare> set_test1;
    for (int n = 0; n < 10; ++n)
    {
	set_test1.insert (std::make_pair(n, NULL));
    }
    //std::copy (set_test.begin(), set_test.end(), std::ostream_iterator<test*>(std::cout, "\n"));

    //std::set<test*, compare>::iterator pos = set_test.find (new test (3, 150));
    //std::set_difference (
    std::cout << "find: " << (*pos)->n_;

}
